package com.cheer.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * @author cheer
 */
@Data
public class OaArticleAddDTO {

    @NotBlank(message = "文章标题不能为空")
    @Length(max = 50, message = "文章标题字符数不能超过50")
    private String title;

    private List<String> moreImg;

    @Length(max = 255, message = "缩略图地址字符数不能超过255")
    private String oneImg;

    @Length(max = 255, message = "大图地址字符数不能超过255")
    private String imgUrl;

    @NotNull(message = "分类不能为空")
    private Integer articleClass;

    @Length(max = 255, message = "来源的字符数不能超过255")
    private String source;

    @Length(max = 255, message = "描述的字符数不能超过255")
    private String describe;

    @Length(max = 255, message = "跳转链接的字符数不能超过255")
    private String href;

    @Length(max = 20, message = "视频时间的字符数不能超过20")
    private String time;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date addTime;

    private Integer sort;

    private String content;
}
